// 基础返回
export interface ResponseData {
  code: number;
  message: string;
  ok: boolean;
}

// 单个职位
export interface RoleData {
  id?: number;
  createTime?: string;
  updatedTime?: string;
  roleName: string;
  remark?: null;
}

// 所有职位列表
export type Records = RoleData[];

// 获取角色响应
export interface RoleResponseData extends ResponseData {
  data: {
    records: Records;
    total: number;
    size: number;
    current: number;
    orders: [];
    optimizeCountSql: boolean;
    hitCount: boolean;
    countId: null;
    maxLimit: null;
    searchCount: boolean;
    pages: number;
  };
}

// 单个菜单的对象数据类型
export interface MenuData {
  id: number;
  createTime: string;
  updateTime: string;
  pid: number;
  name: string;
  code: string;
  toCode: string;
  type: number;
  status: null;
  level: number;
  children: MenuList;
  selected: boolean;
}
// 多个菜单
export type MenuList = MenuData[];
// 菜单接口返回
export interface MenuResponseData extends ResponseData {
  data: MenuList;
}
// 修改角色菜单 上传的数据结构
export interface RoleSetMenuData {
  roleId: number;
  menuId: number[];
}
